home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / disktools / allgemein / val / val.h < prev    next >
C/C++ Source or Header  |  1995-03-09  |  2KB  |  97 lines

  1. #include <ak/filesystem.h>
  2.  
  3. #define I_ROOT        0
  4. #define I_DIR        1
  5. #define I_FIL        2
  6. #define I_EXT        3
  7. #define I_DAT        4
  8. #define I_UNK        5
  9. #define I_UNREADABLE    6
  10. #define I_S_LNK     7
  11. #define I_H_LNK_DIR    8
  12. #define I_H_LNK_FIL    9
  13.  
  14. Static    struct    Root
  15. {    ulong    *blocks;
  16.     ulong    *bblocks;
  17. };
  18. Static    struct    Dir
  19. {    ulong    parent;     /* WARNING!!! parent must be first */
  20.     ulong    *blocks;
  21.     ulong    chain;
  22.     ulong    next;
  23. };
  24. Static    struct    Fil
  25. {    ulong    parent;     /* WARNING!!! parent must be first */
  26.     ulong    num;
  27.     ulong    *blocks;
  28.     ulong    bytesize;
  29.     ulong    chain;
  30.     ulong    extension;
  31.     ulong    next;
  32. };
  33. Static    struct    Ext
  34. {    ulong    parent;     /* WARNING!!! parent must be first */
  35.     ulong    num;
  36.     ulong    *blocks;
  37.     ulong    extension;
  38. };
  39. Static    struct    Dat
  40. {    ulong    key;
  41.     ulong    seqnum;
  42.     ulong    size;
  43.     ulong    nextd;
  44. };
  45. Static    struct    Lnk
  46. {    ulong    parent;     /* WARNING!!! parent must be first */
  47.     ulong    chain;
  48. };
  49. Static    struct    DirLnk
  50. {    ulong    parent;     /* WARNING!!! parent must be first */
  51.     ulong    prev;
  52.     ulong    next;
  53.     ulong    chain;
  54. };
  55. Static    struct    FilLnk
  56. {    ulong    parent;     /* WARNING!!! parent must be first */
  57.     ulong    prev;
  58.     ulong    next;
  59.     ulong    chain;
  60. };
  61. Static    struct    Info
  62. {    union
  63.     {    struct    Root    *root;
  64.         struct    Dir    *dir;
  65.         struct    Fil    *fil;
  66.         struct    Ext    *ext;
  67.         struct    Dat    *dat;
  68.         struct    Lnk    *lnk;
  69.         struct    DirLnk    *dirlnk;
  70.         struct    FilLnk    *fillnk;
  71.         LONG    ret;    /* I_UNREADABLE */
  72.     } Obj;
  73.     ushort    type;
  74.     ushort    flags;
  75. }    *InfoList;
  76.  
  77. /* Bits for  flags  in Info structure */
  78. #define E_CHKSUM    (1 << 0)
  79. #define E_SHORT     (1 << 1)
  80. #define E_COUNT     (1 << 2)
  81. #define E_FIRST     (1 << 3)
  82. #define E_KEY        (1 << 4)
  83. #define E_BMFLG     (1 << 5)
  84. #define E_HTSIZ     (1 << 6)
  85. #define E_BADNAME    (1 << 7)
  86. #define E_OFSLINK    (1 << 9)
  87. #define E_PREVLINK    (1 << 10)
  88. #define E_NEXTLINK    (1 << 11)
  89. #define I_USED        (1 << 15)
  90.  
  91. Static    struct    Names
  92. {    struct    Names    *prev;
  93.     struct    Names    *next;
  94.     ulong    block;
  95.     char    name[BLOCKFILENAMELENGTH+1];
  96. };
  97.